package com.omuao.cloud.stabilization.message.api;

import com.omuao.cloud.stabilization.message.producer.MessageStreamProducer;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 示例
 *
 * @author yuyang
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource(name = "demo")
    MessageStreamProducer messageStreamProducer;

    @RequestMapping("/test")
    public boolean test(String message) {
        boolean flag = messageStreamProducer.sendMessageDemo(message);
        return flag;
    }
}
